// 模拟 外部 服务端

const http = require('http')

const server = http.createServer((req, res) => {
  // 获取请求体的内容
  let arr = []
  req.on('data', (chunk) => {
    arr.push(chunk)
  })
  req.on('end', () => {
    console.info(Buffer.concat(arr).toString())
    res.end('外部Server修改后的内容:荣光无限-Updated')
  })
})

server.listen(1234, () => {
  console.info('external server is running')
})
